package com.wl.designpattern.state;

import com.wl.designpattern.bridge.Person;

/**
 * Created by wangliang on 2021/2/22.
 */
public class Context {

    private PersonState personState;

    public void setPersonState(PersonState personState) {
        this.personState = personState;
    }

    public void fallInLove() {
        setPersonState(new LoveState());
    }

    public void disappointmentInLove() {
        setPersonState(new DogState());
    }

    public void movies() {
        personState.movies();
    }

    public void shopping() {
        personState.shopping();
    }
}
